#ifndef UDPWRITE_H
#define UDPWRITE_H

#include <WinSock2.h>

class UDPWriter
{
public:
	UDPWriter(SOCKET socket);
	UDPWriter(const char *addr, int port);
	~UDPWriter();
	void close();
	int write(const char* buf, int len, const sockaddr_in* to, int tolen);
	int write(const char* buf, int len, const char* ip, int port);
private:
	SOCKET m_socket;
};

#endif
